package object.model;
//Configure level model
public class MySQLData {
	
	private String mySqlTypeName;
	private String javaClassFullName;
	private String javaClassSimpName;
	private String format;
	
	public MySQLData(String mySqlTypeName, String javaClassName, String format) {
		super();
		this.mySqlTypeName = mySqlTypeName;
		this.javaClassFullName = javaClassName;
		this.format = (format.equalsIgnoreCase("null"))?null:format;
		try {
			this.ini();
		} catch (InstantiationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	public String getMySqlTypeName() {
		return mySqlTypeName;
	}
	public String getJavaClassFullName() {
		return javaClassFullName;
	}
	public String getJavaClassSimpName() {
		return javaClassSimpName;
	}
	public String getFormat() {
		return format;
	}
	
	private void ini() throws InstantiationException, IllegalAccessException{
		try {
			String[] cn = this.javaClassFullName.split("\\.");
			this.javaClassSimpName = cn[cn.length-1];
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	
}
